<!DOCTYPE html>
<html>
  <head>
    <!-- 标题及搜索关键字 -->

    <link rel="shortcut icon" type="image/x-icon" href="/img/favicon/favicon.ico" />
    <title>3dtiles图层 | Mars3D | 三维地图 | 火星科技 | 合肥火星科技有限公司</title>

	<link rel="stylesheet" href="http://mars3d.cn/lib/Cesium/Widgets/widgets.css" />
	<link rel="stylesheet" href="http://mars3d.cn/lib/mars3d/mars3d.css" />

	<script src="http://mars3d.cn/lib/Cesium/Cesium.js"></script>
	<script src="http://mars3d.cn/lib/turf/turf.min.js"></script>
	<script src="http://mars3d.cn/lib/mars3d/mars3d.js"></script>
	

    <!--第三方lib-->
    <script
      type="text/javascript"
      src="http://mars3d.cn/lib/include-lib.js"
      libpath="/lib/"
      include="jquery,layer,toastr,font-awesome,ztree,bootstrap,layer,haoutil,mars3d"
    ></script>

    <link href="http://mars3d.cn/css/style.css" rel="stylesheet" />
    <link href="http://mars3d.cn/example/layer-tileset/type/list/city.css" rel="stylesheet" />
  </head>

  <body class="dark">
  
  
      <div id="mars3dContainer" class="mars3d-container"></div>
  
      <script src="http://mars3d.cn/js/common.js"></script>
      
      <script type="text/javascript">
        "use script"; // 开发环境建议开启严格模式
        window.currentPath = "/example/map/create/options/";// 当前示例的目录
        
        
        function initMap() {
          // 创建三维地球场景
          var map = new mars3d.Map("mars3dContainer", {
            scene: {
              center: { lat: 30.054604, lng: 108.885436, alt: 17036414, heading: 0, pitch: -90 },
              showSun: true,
              showMoon: true,
              showSkyBox: true,
              showSkyAtmosphere: false, // 关闭球周边的白色轮廓 map.scene.skyAtmosphere = false
              fog: true,
              fxaa: true,
              globe: {
                showGroundAtmosphere: false, // 关闭大气（球表面白蒙蒙的效果）
                depthTestAgainstTerrain: false,
                baseColor: "#546a53"
              },
              cameraController: {
                zoomFactor: 3.0,
                minimumZoomDistance: 1,
                maximumZoomDistance: 50000000,
                enableRotate: true,
                enableZoom: true
              },
              mapProjection: mars3d.CRS.EPSG3857, // 2D下展示墨卡托投影
              mapMode2D: Cesium.MapMode2D.INFINITE_SCROLL // 2D下左右一直可以滚动重复世界地图
            },
            control: {
              baseLayerPicker: true, // basemaps底图切换按钮
              homeButton: true, // 视角复位按钮
              sceneModePicker: true, // 二三维切换按钮
              navigationHelpButton: true, // 帮助按钮
              fullscreenButton: true, // 全屏按钮
              contextmenu: { hasDefault: true } // 右键菜单
            },
            terrain: {
              url: "//data.mars3d.cn/terrain",
              show: true
            },
            basemaps: [
              {
                name: "天地图影像",
                icon: "//data.mars3d.cn/img/thumbnail/basemap/tdt_img.png",
                type: "tdt",
                layer: "img_d",
                show: true
              }
            ]
          })
        
          // 打印测试信息
          console.log("mars3d的Map主对象构造完成", map)
          console.log("其中Cesium原生的Cesium.Viewer为", map.viewer)
        
          console.log("当前电脑是否支持webgl2", Cesium.FeatureDetection.supportsWebgl2(map.scene))
        
          return map
        }
        
      </script>
  </body>
  
  </html>
